# -*- coding: latin-1 -*-
class InferenceRule:
    def getqueries(self):
        return []

    def makeTriples(self, binding):
        return self.makeTriples(**binding)

class EasternConferemceAtlanticPlayerRule(InferenceRule):
    def getqueries(self):
        bosQuery = [('?player', 'play_2012_2013', 'BOS')]
        bknQuery = [('?player', 'play_2012_2013', 'BKN')]
        nyQuery = [('?player', 'play_2012_2013', 'NY')]
        phiQuery = [('?player', 'play_2012_2013', 'PHI')]
        torquery = [('?player', 'play_2012_2013', 'TOR')]
        return [bosQuery, bknQuery, nyQuery, phiQuery, torquery]

    def _maketriples(self, player):
        return [(player, 'belong', 'ECAP_2012_2013')]

class MostConsistentPlayerRule(InferenceRule):
    def getqueries(self):
        MostConsistentPlayersQuery = [('?player', 'AVG_PPG_2011_2012', '{TOP10}'),
                                      ('?player', 'AVG_PPG_2012_2013', '{TOP10}')
                                      ]
        return [MostConsistentPlayersQuery]

    def _maketriples(self, player):
        return [(player, 'is', "MCP_2011_2013")]

class MostValuablePlayer2011Rule(InferenceRule):
    def getqueries(self):
        MostConsistentPlayersQuery = [
                                      ('?player', 'AVG_PPG_2011_2012', '{TOP10}'),
                                      ('?player', 'AVG_FG_M_2011_2012', '{TOP10}'),
                                      ('?player', 'AVG_3PT_M_2011_2012', '{TOP10}')
                                      ]
        return [MostConsistentPlayersQuery]

    def _maketriples(self, player):
        return [(player, 'is', "MVP_2011_2012")]

class MostValuablePlayer2012Rule(InferenceRule):
    def getqueries(self):
        MostConsistentPlayersQuery = [
                                      ('?player', 'AVG_PPG_2012_2013', '{TOP10}'),
                                      ('?player', 'AVG_FG_M_2012_2013', '{TOP10}'),
                                      ('?player', 'AVG_3PT_M_2012_2013', '{TOP10}')
                                      ]
        return [MostConsistentPlayersQuery]

    def _maketriples(self, player):
        return [(player, 'is', "MVP_2012_2013")]